package gestion.horarios.model.jpa.entities;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the nivelescarrera database table.
 * 
 */
@Entity
@Table(name="nivelescarrera")
public class NivelesCarrera implements Serializable {
	private static final long serialVersionUID = 1L;
	private NivelesCarreraPK id;
	private String codigo;
	private byte creditos;
	private byte horas;
	private List<DetalleMallaCurricular> detallemallacurriculars;
	private List<DetallePlanCurricular> detalleplancurriculars;
	private Carrera carrera;

    public NivelesCarrera() {
    }


	@EmbeddedId
	public NivelesCarreraPK getId() {
		return this.id;
	}

	public void setId(NivelesCarreraPK id) {
		this.id = id;
	}
	

	@Column(length=45)
	public String getCodigo() {
		return this.codigo;
	}

	public void setCodigo(String codigo) {
		this.codigo = codigo;
	}


	public byte getCreditos() {
		return this.creditos;
	}

	public void setCreditos(byte creditos) {
		this.creditos = creditos;
	}


	public byte getHoras() {
		return this.horas;
	}

	public void setHoras(byte horas) {
		this.horas = horas;
	}


	//bi-directional many-to-one association to DetalleMallaCurricular
	@OneToMany(mappedBy="nivelescarrera")
	public List<DetalleMallaCurricular> getDetallemallacurriculars() {
		return this.detallemallacurriculars;
	}

	public void setDetallemallacurriculars(List<DetalleMallaCurricular> detallemallacurriculars) {
		this.detallemallacurriculars = detallemallacurriculars;
	}
	

	//bi-directional many-to-one association to DetallePlanCurricular
	@OneToMany(mappedBy="nivelescarrera")
	public List<DetallePlanCurricular> getDetalleplancurriculars() {
		return this.detalleplancurriculars;
	}

	public void setDetalleplancurriculars(List<DetallePlanCurricular> detalleplancurriculars) {
		this.detalleplancurriculars = detalleplancurriculars;
	}
	

	//bi-directional many-to-one association to Carrera
    @ManyToOne
	@JoinColumn(name="CarreraId", nullable=false, insertable=false, updatable=false)
	public Carrera getCarrera() {
		return this.carrera;
	}

	public void setCarrera(Carrera carrera) {
		this.carrera = carrera;
	}
	
}